package ar.com.listeners;

import objetos.SubCategoria;
import android.view.View;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.AdapterView.OnItemSelectedListener;
import ar.com.gastos.MainActivity;

public class ComboSubCategoriaListener implements OnItemSelectedListener {

	
	private MainActivity mainActivity;
	private EditText importe;
	
	public ComboSubCategoriaListener(MainActivity mainActivity,EditText importe){
		this.importe = importe;
		this.mainActivity = mainActivity;
		
	}
	
	
	
	@Override
	public void onItemSelected(AdapterView<?> parent, View view, int pos,long id) {
			 
		SubCategoria itemAtPosition =(SubCategoria) parent.getItemAtPosition(pos);
		importe.setText(itemAtPosition.getImporteAnterior().toString());
	}

	@Override
	public void onNothingSelected(AdapterView<?> arg0) {
		// TODO Auto-generated method stub
		
	}

}
